<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template attribute_actor</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../index.html" title="Chapter 1. Boost.Log v2">
<link rel="up" href="../../../expressions.html#header.boost.log.expressions.attr_fwd_hpp" title="Header &lt;boost/log/expressions/attr_fwd.hpp&gt;">
<link rel="prev" href="attr_idm45961922850000.html" title="Function template attr">
<link rel="next" href="attribute_terminal.html" title="Class template attribute_terminal">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="attr_idm45961922850000.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../expressions.html#header.boost.log.expressions.attr_fwd_hpp"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="attribute_terminal.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.log.expressions.attribute_actor"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template attribute_actor</span></h2>
<p>boost::log::expressions::attribute_actor</p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../../expressions.html#header.boost.log.expressions.attr_fwd_hpp" title="Header &lt;boost/log/expressions/attr_fwd.hpp&gt;">boost/log/expressions/attr_fwd.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> FallbackPolicyT<span class="special">,</span> <span class="keyword">typename</span> TagT<span class="special">,</span> 
         <span class="keyword">template</span><span class="special">&lt;</span> <span class="keyword">typename</span> <span class="special">&gt;</span> <span class="keyword">class</span> ActorT<span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="attribute_actor.html" title="Class template attribute_actor">attribute_actor</a> <span class="special">:</span>
  <span class="keyword">public</span> <span class="identifier">ActorT</span><span class="special">&lt;</span> <span class="identifier">attribute_terminal</span><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">FallbackPolicyT</span><span class="special">,</span> <span class="identifier">TagT</span> <span class="special">&gt;</span> <span class="special">&gt;</span>
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// <a class="link" href="attribute_actor.html#boost.log.expressions.attribute_actorconstruct-copy-destruct">construct/copy/destruct</a></span>
  <span class="keyword">explicit</span> <a class="link" href="attribute_actor.html#idm45961923129968-bb"><span class="identifier">attribute_actor</span></a><span class="special">(</span><span class="identifier">base_type</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="attribute_actor.html#idm45961922862272-bb">public member functions</a></span>
  <span class="identifier">attribute_name</span> <a class="link" href="attribute_actor.html#idm45961922861712-bb"><span class="identifier">get_name</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">fallback_policy</span> <span class="keyword">const</span>  <span class="special">&amp;</span> <a class="link" href="attribute_actor.html#idm45961922859600-bb"><span class="identifier">get_fallback_policy</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">or_none_result_type</span> <a class="link" href="attribute_actor.html#idm45961922857472-bb"><span class="identifier">or_none</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">or_throw_result_type</span> <a class="link" href="attribute_actor.html#idm45961922856096-bb"><span class="identifier">or_throw</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> DefaultT<span class="special">&gt;</span> 
    <a class="link" href="attribute_actor.html" title="Class template attribute_actor">attribute_actor</a><span class="special">&lt;</span> <span class="identifier">value_type</span><span class="special">,</span> <span class="identifier">fallback_to_default</span><span class="special">&lt;</span> <span class="identifier">DefaultT</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">tag_type</span><span class="special">,</span> <span class="identifier">ActorT</span> <span class="special">&gt;</span> 
    <a class="link" href="attribute_actor.html#idm45961923133472-bb"><span class="identifier">or_default</span></a><span class="special">(</span><span class="identifier">DefaultT</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idm46846472504896"></a><h2>Description</h2>
<p>An attribute value extraction terminal actor </p>
<div class="refsect2">
<a name="idm46846472504160"></a><h3>
<a name="boost.log.expressions.attribute_actorconstruct-copy-destruct"></a><code class="computeroutput">attribute_actor</code> 
        public
       construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"><span class="keyword">explicit</span> <a name="idm45961923129968-bb"></a><span class="identifier">attribute_actor</span><span class="special">(</span><span class="identifier">base_type</span> <span class="keyword">const</span> <span class="special">&amp;</span> act<span class="special">)</span><span class="special">;</span></pre>Initializing constructor. </li></ol></div>
</div>
<div class="refsect2">
<a name="idm46846472495232"></a><h3>
<a name="idm45961922862272-bb"></a><code class="computeroutput">attribute_actor</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="identifier">attribute_name</span> <a name="idm45961922861712-bb"></a><span class="identifier">get_name</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The attribute name </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">fallback_policy</span> <span class="keyword">const</span>  <span class="special">&amp;</span> <a name="idm45961922859600-bb"></a><span class="identifier">get_fallback_policy</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Fallback policy </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">or_none_result_type</span> <a name="idm45961922857472-bb"></a><span class="identifier">or_none</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Generates an expression that extracts the attribute value or a default value. </li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">or_throw_result_type</span> <a name="idm45961922856096-bb"></a><span class="identifier">or_throw</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Generates an expression that extracts the attribute value or throws an exception. </li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> DefaultT<span class="special">&gt;</span> 
  <a class="link" href="attribute_actor.html" title="Class template attribute_actor">attribute_actor</a><span class="special">&lt;</span> <span class="identifier">value_type</span><span class="special">,</span> <span class="identifier">fallback_to_default</span><span class="special">&lt;</span> <span class="identifier">DefaultT</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">tag_type</span><span class="special">,</span> <span class="identifier">ActorT</span> <span class="special">&gt;</span> 
  <a name="idm45961923133472-bb"></a><span class="identifier">or_default</span><span class="special">(</span><span class="identifier">DefaultT</span> <span class="keyword">const</span> <span class="special">&amp;</span> def_val<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Generates an expression that extracts the attribute value or a default value. </li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2007-2021 Andrey Semashev<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>).
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="attr_idm45961922850000.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../expressions.html#header.boost.log.expressions.attr_fwd_hpp"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="attribute_terminal.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
